<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8"/>
	<title>编辑app</title>
	<link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all"/>
	<link rel="stylesheet" href="/static/css/global.css" media="all"/>
	<link rel="stylesheet" href="/static/plugins/font-awesome/css/font-awesome.min.css"/>
	<link rel="stylesheet" href="/static/css/table.css"/>
</head>
<body>
<div class="admin-main" templateLoad="" onFinishCallback="onPageFinish">
	<blockquote class="layui-elem-quote">
		<a href="./list.html" class="layui-btn layui-btn-small"> <i class="layui-icon">&#xe608;</i> 应用列表 </a>
	</blockquote>

	<form class="layui-form" action="/admin/app/edit">
		<input type="hidden" bindAttr="id" name="id">
		<div class="layui-form-item">
			<label class="layui-form-label">应用标识</label>
			<div class="layui-input-block">
				<input type="text" name="name" class="layui-input" placeholder="字母、数字、下划线、中划线" autocomplete="off"
					   equired lay-verify="required" bindAttr="name">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">应用名称</label>
			<div class="layui-input-block">
				<input type="text" name="alias" class="layui-input" placeholder="中文名称" autocomplete="off"
					   equired lay-verify="required" bindAttr="alias">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">应用SCM</label>
			<div class="layui-input-block">
				<input type="text" name="scmLink" class="layui-input" placeholder="代码服务器地址" autocomplete="off"
					   equired lay-verify="required" bindAttr="scmLink">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">负责人</label>
			<div class="layui-input-block">
				<select id="masterUid" name="masterUid" lay-verify="required" asnycSelect="/admin/user/options"
						lay-filter="masterUid_select" onDataLoadCallback="onUserSelectLoadFinish">
					<option value="">请选择负责人</option>
				</select>
			</div>
		</div>
		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">相关人员邮箱</label>
			<div class="layui-input-block">
				<textarea name="notifyEmails" placeholder="相关人员邮箱，多个‘,’隔开(可选)"
						  class="layui-textarea" bindAttr="notifyEmails"></textarea>
			</div>
		</div>
		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">备注</label>
			<div class="layui-input-block">
				<textarea name="remarks" placeholder="备注内容(可选)" class="layui-textarea" bindAttr="remarks"></textarea>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<input type="button" class="layui-btn J_ajaxSubmit" onSuccessJumpurl="./list.html" value="保存"/>
				<input type="reset" class="layui-btn layui-btn-primary" value="重置"/>
			</div>
		</div>
	</form>
</div>

<script type="text/javascript" src="/static/plugins/layui/layui.js"></script>
<script type="text/javascript" src="/static/js/common.js?v20180106?a=91"></script>
<script type="text/javascript">
	var defMasterUid;

	function onPageFinish(data) {
		defMasterUid = data.masterUid;
	}

	function onUserSelectLoadFinish(data) {
		for (var index in data) {
			data[index].selected = data[index].value == defMasterUid;
		}
	}
</script>
</body>
</html>